#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;

class Solution {
public:
    string removeTrailingZeros(string num)
    {
        for (int i = num.size() - 1; i >= 0; i--)
        {
            if (num[i] != '0')
                break;
            num.erase(num.begin() + i);
        }
        return num;
    }
};